<template>
  <div class="app-container">
    <!-- 添加或修改配置计划对话框 -->
    <el-dialog title="title" :visible="true" width="850px" append-to-body>
      <el-form ref="form" :model="form" label-width="110px">
        <div v-for="(item, index) in form.disConfBaseList" :key="index">
          <el-form-item label="需产生基线" prop="baselineName">
            <el-input
              v-model="item.baselineName"
              placeholder="请输入需产生基线"
              style="width: 100%"
              @change="dd(item)"
            />
          </el-form-item>
          <el-row>
            <div align="center">
              <el-button
                type="warning"
                size="mini"
                icon="el-icon-plus"
                @click="baseDataAdd(index)"
                >新增一行
              </el-button>
              <el-button
                type="danger"
                size="mini"
                icon="el-icon-plus"
                @click="deleteBase(index)"
                >删除基线
              </el-button>
            </div>
            <br />
          </el-row>
        </div>
        <div align="center">
          <el-button
            type="success"
            size="mini"
            icon="el-icon-plus"
            @click="addBase()"
            >新增基线
          </el-button>
        </div>
        <el-row>
          <el-col :span="12">
            <el-form-item label="编写人" prop="approver">
              <el-select
                v-model="form.approver"
                placeholder="请选择提出人"
                ref="select"
                filterable
                style="width: 80%"
              >
                <el-option
                  v-for="item in userList"
                  :key="item.userId"
                  :label="item.nickName"
                  :value="item.userId"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="编写时间" prop="approverTime">
              <el-date-picker
                clearable
                v-model="form.approverTime"
                type="date"
                value-format="yyyy-MM-dd"
                placeholder="请选择审批时间"
                style="width: 80%"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary">确 定 </el-button>
        <el-button>取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "DisConfPlan",
  data() {
    return {
      form: {
        disConfBaseList: [
          {
            baselineName: "4844",
            table: {},
          },
        ],
        disConfPlanBaseList: [],
      },
      userList: [],
    };
  },
};
</script>
<style lang="scss" scoped>
//输入框禁用样式
.el-input.is-disabled ::v-deep .el-input__inner {
  color: #000000;
  background-color: white;
}

//文本域禁用样式
.el-textarea.is-disabled ::v-deep .el-textarea__inner {
  background-color: #ffffff;
  color: #000000;
}

//下拉框禁用样式
.el-select ::v-deep .el-input__inner {
  background-color: #ffffff;
  color: #000000;
}
</style>
